package huawei;

import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;

public class EnglishInput {

    public static void main(String[] args) {
        String s = "The furthest distance in the world, Is not between life and death, But when I stand in front of you, Yet you don't know that I love you.";
        String[] strings = s.replace(",", "").replace(".", "").split(" ");

        Set<String> set = new HashSet<>();

        for (String string : strings) {
            if (string.trim().contains("`")) {
                String[] strings1 = string.split("`");
                for (String string1 : strings1) {
                    set.add(string1);
                }
            } else {
                set.add(string);
            }
        }

        String s2 = "f";

        for (String string : set) {
            if (string.toLowerCase().startsWith(s2.toLowerCase())) {
                System.out.print(string + " ");
            }
        }
    }
}
